CCSTM: A Library-Based STM for Scala
نویسندگان
چکیده
We introduce CCSTM, a library-based software transactional memory (STM) for Scala, and give an overview of its design and implementation. Our design philosophy is that CCSTM should be a useful tool for the parallel programmer, rather than a parallelization mechanism for arbitrary sequential code, or the sole synchronization primitive in a system. CCSTM expresses transactional reads and writes as explicit method calls on instances of a reference type. Scala’s flexible method names, implicit parameters, and closures keep the syntax concise, and the reference instances provide a natural way to express additional STM functionality. We use a novel hybrid of static and dynamic transaction scoping to retain composability while avoiding the barrier overheads that would otherwise result from an implementation as an unprivileged library. Experiments show that CCSTM’s performance and scalability are on par with bytecode rewriting STMs.
منابع مشابه
Tool Demo: Scala-Virtualized
This paper describes Scala-Virtualized, which extends the Scala language and compiler with a small number of features that enable combining the benefits of shallow and deep embeddings of DSLs. We demonstrate our approach by showing how to embed three different domain-specific languages in Scala. Moreover, we summarize how others have been using our extended compiler in their own research and te...
متن کاملVerified Subtyping with Traits and Mixins
Traits allow decomposing programs into smaller parts and mixins are a form of composition that resemble multiple inheritance. Unfortunately, in the presence of traits, programming languages like Scala give up on subtyping relation between objects. In this paper, we present a method to check subtyping between objects based on entailment in separation logic. We implement our method as a domain sp...
متن کاملConcurrent Programming Paradigms, A Comparison in Scala
There is a rapid rise of multi-cores in recent hardware architectures. To exploit computational power of multi-core architectures, software should shift to be as concurrent as possible; and therefore should have concurrency control mechanisms. There are different concurrency programming paradigms such as locking and conditions, non-blocking algorithms, actors and software transactional memory (...
متن کاملFaster Scala Collections with Compile-Time Reflection
We describe the implementation of specific Scala collections operations (currently the map and foreach methods) using the Scala 2.10 compile-time reflection facilities. The primary motivation for this work is to create faster collections by inlining operations at the call site. The functionality is available at the standard Scala library level, so that our optimized operations can be used on al...
متن کاملAnnotated imports
Presented simple extensions to scala language related to import statements: exported imports, which provide ability to reuse sequence of import clauses in composable form and default rewriters, which provide mechanism for pluggable macro-based AST transformation of overall compilation unit, activated by import of library object. Using these facilities not only allows more compact code, it preve...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2010